It has become well-known practice to automate industrial processes by the use of a special purpose computer known as a programmable controller ("PC"). The PC periodically scans input variables from the process, performs suitable logical manipulations on the inputs and updates output variables for the process.
Reduced to bare essentials, the industrial process may be regarded as having a number of sensors and drivers. The sensors provide input values representative of the state of the process at a given time; the drivers respond to output values, and thereby control various aspects of the process. Some of the inputs and outputs are binary, corresponding to limit switches, relay contacts, proximity switches and the like, while others may be numeric, corresponding to temperatures, pressures, positions, and other physical parameters that characterize the process being controlled. However, it may be assumed that suitable interface modules have been provided so that the inputs and outputs appear to the PC as simple binary inputs and outputs.
Typically, there are a large number of input sensors and output drivers that must be serviced. While some large systems might have as many as 2000-4000 variables, 500 is a more representative number.
Despite the phenomenal advances in computer technology, general purpose computers are still too slow to scan the large numbers of inputs and update the outputs for the large systems required. Accordingly, a common PC configuration comprises a special purpose computer embedded within, or in some way coupled to, a general purpose computer. The special purpose computer performs the scan cycle (reading the inputs and computing the current value of the outputs) as rapidly as possible, while the general purpose computer attends to numerous calculations and communications with peripheral devices, terminals, and the like. The special purpose computer may be referred to as the "scan processor" or "scanner." Except where the distinction is important, the term "PC" will sometimes be applied to the scanner alone, and sometimes to the scanner and the general purpose computer together.
The current state of PC's reflects the prior practice of "programming" the system to be monitored and controlled by hard-wiring a representative relay logic ladder. The ladder would comprise a generally rectangular array of interconnected relay coils disposed between opposite contacts of a power supply. The state of any given relay contact would reflect the state of a corresponding switch to be monitored, and a given relay coil would control a corresponding driver to be actuated. The response time of such a system would be determined by the characteristic time for the closing of a relay, generally about 5-10 ms. The relays would often have multiple contacts to permit the corresponding input variable to be sensed at multiple places in the ladder.
In view of this historical development, programmable controllers evolved with a view to simulating such relay logic ladders. PC's are thus provided with a programming panel with which the programmer enters a graphical representation of the ladder into the computer memory. The graphical representation is then converted into some sort of internal instruction stream (i.e., is assembled or compiled) so that subsequent execution of the instructions in the stream causes the appropriate logical manipulations to be performed. The sensor and driver values are stored in a working memory, called an input/output image memory ("IOIM"), which is accessed by the PC.
While the PC clearly represents an advance over the hard-wired logic ladder, the PC cannot always match the ladder in speed, especially where relays have multiple contacts. Thus, for the PC to compete on a speed basis, it should be able to complete a scan cycle in the characteristic relay response time. However, even the currently obtainable PC's are often not fast enough to scan 4000 input occurrences (perhaps corresponding to fewer than 1000 actual inputs, each of which appears at several places in the program) in 5 ms. Therefore, for subsets of inputs and outputs that must be updated at shorter intervals than that of the scan cycle, corresponding portions of the program must be executed several times during a complete scan cycle.
As mentioned above, the PC operates according to a cycle that includes an input phase where the IOIM is updated to reflect changes in the sensor values, a processing phase wherein logical and numeric operations are carried out to update the IOIM values, and an output phase where the newly computed output variables are applied to the drivers. As alluded to above, general purpose microcomputers are generally too slow to carry out many of the tasks, and a shared processing regime must be employed.
The concept of dedicated processors for carrying out specialized tasks is not new. For example, a peripheral controller tied to a main processor often includes a dedicated processor that executes its own program from its own memory. Instructions and data are received from the main processor and are regarded as data that affect the peripheral processor's program operation.
Similarly, it is known practice to provide a co-processing regime where a main processor and a specialized processor execute instructions from a common memory. In one such regime, the two processors have respective instruction sets that are objectively distinguishable from each other. Each instruction is fetched and examined by both processors, and depending on the set to which the instruction set belongs, one processor or the other will execute the instruction. A variant of this uses a transitional instruction to determine which processor is to take control. For example, a microprocessor such as an Intel 8086 may be operated in conjunction with a special numeric processor such as an Intel 8087. In such a case, the 8086 and 8087 share program memory and local bus resources. Passage of control from the 8086 to the 8087 occurs by means of a particular memory access instruction called the ESCAPE instruction. While the 8086 is fetching and executing instructions, the 8087 tests each instruction, and is activated upon encountering an ESCAPE instruction. After execution of the ESCAPE instruction by the 8086, the 8086 and the 8087 continue executing their specific tasks in parallel. A more complete description of the 8086 and its co-processor capability may be found in "The 8086 Book", R. Rector, George Alexy (Osborne/McGraw Hill 1980) at pages 3-107, 10-2, and 10-3.
In considering the design of a PC, there are a number of apparently mundane considerations that turn out to represent fairly fundamental constraints. The choice of word length is an example of this. Given that most digital logic is carried out in 8-bit multiples, a word length that is an 8-bit multiple is strongly indicated. For a PC that includes a special purpose computer operating in conjunction with a general purpose computer, some of the characteristics of the general purpose computer are imposed on the special purpose computer. This militates strongly in favor of a 16-bit word, given the current generation of microprocessors.
Once the appropriate word length is decided, the sizes of systems that must be controlled further constrain the allocation of bits within the word. Of the 16 bits, a 12-bit address field (to address 4000 contacts) may be considered to be a practical necessity, although many systems may only require 1000-2000 contacts. Even so, larger systems might require more than 4000 contacts to be addressed, thereby necessitating some sort of extended address scheme. With a 12-bit address field, the opcode has only 4 bits.
Thus the special purpose computer in the PC system requires all sixteen bits of the word length to specify the opcode and address. Therefore, there can be no requirement that the instructions for the general purpose computer be distinguishable from the instructions for the special purpose computer.
A major objective of almost any innovative design is to produce the best adapted functionality at lowest possible cost. The complexity in terms of component count of a given implementation effects both, especially when one considers that a major component of functionality is reliability, which is dramatically impacted by component count. This is especially true for programmable controllers, which are intended for application in harsh environments, notably those where heat poses a threat to the reliability of electronic components. A large component count clearly contributes to the problem, because the component dissipation contributes significantly to the ambient heat, resulting in exponential degradation of reliability with increases in component count.